-- GENERATED SPELL FOR [Mjordin Combatant] --


function spell0_30037(pUnit, Event) --@Dominate,n/a--
pUnit:FullCastSpellOnTarget(61343,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30037', 1000, 1)
end

function spell1_30037(pUnit, Event) --@Jump Attack,n/a--
pUnit:FullCastSpellOnTarget(61227,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30037', 520, 1)
end

function spell2_30037(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(32736,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30037', 5338, 1)
end

function spell3_30037(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(50370,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30037', 15319, 1)
end

function spell4_30037(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15578,pUnit)
pUnit:RegisterEvent('Sorts_30037', 553, 1)
end

function spell5_30037(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(49807,pUnit)
pUnit:RegisterEvent('Sorts_30037', 2000, 1)
end

function Sorts_30037(pUnit, Event)
local choix_sorts_30037 = math.random(0, 5)
if choix_sorts_30037 == 0 then
pUnit:RegisterEvent('spell0_30037', 1, 1)
end
if choix_sorts_30037 == 1 then
pUnit:RegisterEvent('spell1_30037', 1, 1)
end
if choix_sorts_30037 == 2 then
pUnit:RegisterEvent('spell2_30037', 1, 1)
end
if choix_sorts_30037 == 3 then
pUnit:RegisterEvent('spell3_30037', 1, 1)
end
if choix_sorts_30037 == 4 then
pUnit:RegisterEvent('spell4_30037', 1, 1)
end
if choix_sorts_30037 == 5 then
pUnit:RegisterEvent('spell5_30037', 1, 1)
end
end

function mob30037_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30037', math.random(1500, 3000), 1)
end

function mob30037_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30037_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30037_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30037, 1, 'mob30037_Action')
RegisterUnitEvent(30037, 2, 'mob30037_Leave')
RegisterUnitEvent(30037, 3, 'mob30037_Kill')
RegisterUnitEvent(30037, 4, 'mob30037_Die')
